from scrapy.cmdline import execute
import sys,os
	
# 将项目目录动态设置到环境变量中
# os.path.abspath(__file__) 获取main.py的路径
# os.path.dirname(os.path.abspath(__file__) 获取main.py所处目录的上一级目录
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
#execute(['scrapy','crawl','jobboleItem'])
#execute(['scrapy','crawl','jobboleItemLoad'])
execute(['scrapy','crawl','jobbole'])